package com.fxm.controller;

import com.fxm.client.StatisticClient;
import com.fxm.returns.RespEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * <p>
 * 统计模块 前端控制器
 * </p>
 *
 * @author fxm
 * @since 2021-02-23
 */
@RestController
@RequestMapping("/statistic")
@Slf4j
@Api(value = "统计模块", tags = "统计模块")
public class StatisticController {

    @Autowired
    private StatisticClient statisticClient;

    @GetMapping("/integral")
    @ApiOperation(value = "答题积分统计")
    public RespEntity integral() {
        RespEntity respEntity = statisticClient.integral();
        return respEntity;
    }

    @GetMapping("/sign")
    @ApiOperation(value = "累计签到天数统计")
    public RespEntity sign() {
        RespEntity respEntity = statisticClient.sign();
        return respEntity;
    }

}
